<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>男朋友</title>
<%-- <script src="${pageContext.request.contextPath }/statics/js/jquery-3.5.1.js"></script>
    <style>
        *{margin: 0;padding: 0}
        html, body{height: 100%}
        #cc{width: 100%;height:100%}
    </style>
    <script>
            $("#b1").click(function(){
                $('#cc').load('${pageContext.request.contextPath }/toUpdateBoyFriend/${bdetail}');
        })
    </script>
</head>
<body>
	<div id="cc">
	<table>
		<tr><th>名字</th><th>年龄</th><th>描述</th><th>女朋友</th><th>操作</th></tr>
		<c:forEach var="boyFriend" items="${boyFriends}">
			<tr><td>${boyFriend.bname}</td><td>${boyFriend.bage }</td><td>${boyFriend.bdetail }</td>
			<td>${boyFriend.girlFriend.gname },${boyFriend.girlFriend.gage },${boyFriend.girlFriend.gdetail }</td>
			<td><a href="#" id="b1">更新|</a>
			<a href="${pageContext.request.contextPath }/deleteBoyFriend/${boyFriend.bage}">删除</a></td></tr>
		</c:forEach>
	</table></div> --%>
</head>
<body>
	<a href="${pageContext.request.contextPath }/love">回到情侣页面</a>
	<table>
		<tr><th>名字</th><th>年龄</th><th>描述</th><th>女朋友</th><th>操作</th></tr>
		<c:forEach var="boyFriend" items="${boyFriends}">
			<tr><td>${boyFriend.bname}</td><td>${boyFriend.bage }</td><td>${boyFriend.bdetail }</td>
			<td>${boyFriend.girlFriend.gname },${boyFriend.girlFriend.gage },${boyFriend.girlFriend.gdetail }</td>
			<td><a href="${pageContext.request.contextPath }/toUpdateBoyFriend/${boyFriend.bdetail}">更新|</a>
			<a href="${pageContext.request.contextPath }/deleteBoyFriend/${boyFriend.bage}">删除</a></td></tr>
		</c:forEach>
	</table>
</body>
</html>